home *** CD-ROM | disk | FTP | other *** search
/ The Ultimate Human Body 2.0 / Ultimate Human Body 2.0, The (1996)(Dorling Kindersley).iso / dksetup / dkgen.bak < prev    next >
Text File  |  1996-09-23  |  39KB  |  967 lines

  1. '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2. '
  3. '   DKGEN.INC
  4. '
  5. '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  6. ' See the change history in DKSETUP.MST for more recent changes.
  7. '
  8. '25/06/96 Added the extra ini settinigs into the InstallQTW function.
  9. '27/02/96 Added the InstallQTW function.
  10. '25/01/96 Change the EndCommonInstall and HandleRestart SUB's to Functions to
  11. '         utilise return values. So the user does NOT get the 'You must restart
  12. '         windows' warning AND THEN the 'Successful install' dialog box.
  13. '25/01/96 Change path checking to look for Max of 8 chars first.
  14. '08/08/95 Test for Norton Anti Virus
  15. '03/08/95 const for uninstall and min register added
  16. '07/07/95 Correct so unregisters use of ctl3d
  17. '01/06/95 No choice about adding icons to progman
  18. '?/05/95  If bundle with sampler need to test for cirrus driver - put into mst file
  19. '12/03/95 Alternative function added, readme icon has shortened name
  20.  
  21. '$INCLUDE 'setupapi.inc'
  22. '$INCLUDE 'msdetect.inc'
  23. '$INCLUDE 'dklang.inc'
  24.  
  25. '   Defines unlikely to change
  26. CONST APPLICATION_MENU_FILE     = "custmenu.exe"
  27. CONST INI_FILE_SOURCE = "AppPath" ' OR  "WinPath"
  28. CONST EDITOR_EXE        = "write.exe "
  29. CONST SAMPLER_PATH      = "SAMPLER"
  30. CONST SAMPLER_EXE_FILE  = "sampler.exe"
  31. CONST SAMPLER_INI_FILE  = "sampler.ini"
  32. CONST SAMPLER_BINARIES_SECTION_NAME = "SAMPBIN"
  33. CONST SAMPLER_README_FILE = "SREADME.WRI"
  34.  
  35. CONST SOURCE_BINARIES_SUBDIR = "DKCODE"
  36. CONST SOURCE_SETUP_SUBDIR = "DKSETUP"
  37. CONST SETUP_INF_FILENAME = "SETUP.INF"
  38. CONST CUIDLL_FILENAME = "mscuistf.dll"
  39. CONST SETUP_INI_BINARIES_SECTION_NAME = "BIN"
  40. CONST SETUP_INI_SH_BINARIES_SECTION_NAME = "BIN Shared"
  41. CONST SETUP_INI_WING_BINARIES_NAME = "WinG Runtime"
  42. CONST SETUP_INI_WING32_BINARIES_NAME = "WinG32"
  43. CONST SETUP_INI_ACM_SECTION_NAME = "ACM Drivers"
  44. CONST SETUP_INI_FONTS_SECTION_NAME = "Fonts"
  45.  
  46. 'unin, min register
  47. CONST UNINSTALL_EXE_FILE = "UNINSTAL.exe"
  48. CONST DKREG_INI_DIR = "\MMAPP"
  49. CONST DKREG_INI_PATH = "\MMAPP\MMAPP.ini"
  50. CONST WIN_INI_ENTRY = "path"
  51.  
  52. CONST PRODUCT_INI_DIR_SECTION_NAME = "Directory"
  53. CONST PRODUCT_INI_DIR_ENTRY_NAME = "Data"
  54.  
  55. CONST MINIMUM_DISK_SPACE = 2048 ' For Minimum install
  56.  
  57. ' Procs
  58. CONST PROC_HELP = "FHelpDlgProc"
  59.  
  60. DECLARE FUNCTION ExitWindowsExec LIB "USER.EXE" (szEXE$, szParams$) AS INTEGER
  61. DECLARE FUNCTION GetActiveWindow    lib "User" () as integer
  62. DECLARE FUNCTION GetParent    lib "User" (hwnd as integer) as integer
  63. DECLARE FUNCTION SetWindowPos       lib "User" (hwnd as integer, hwnd as integer, i as integer, i as integer, i as integer, i as integer, w as integer) as integer
  64.  
  65. DECLARE FUNCTION Ctl3dRegister LIB "CTL3D.DLL" (hInst%) AS INTEGER
  66. DECLARE FUNCTION Ctl3dUnregister LIB "CTL3D.DLL" (hInst%) AS INTEGER
  67. DECLARE FUNCTION Ctl3dAutoSubClass LIB "CTL3D.DLL" (hInst%) AS INTEGER
  68.  
  69. DECLARE FUNCTION OnWin3x LIB "setuphlp.DLL" AS INTEGER
  70. DECLARE FUNCTION VflatdPresent LIB "setuphlp.DLL" AS INTEGER
  71. DECLARE FUNCTION GetRealSystemDir LIB "setuphlp.DLL" (szDir$,cbBuf%) AS INTEGER
  72. DECLARE FUNCTION RestartWindows LIB "setuphlp.DLL" AS INTEGER
  73. DECLARE FUNCTION IsWin32FileNewer LIB "setuphlp.DLL" (szOrig$,szNew$) AS INTEGER
  74. DECLARE SUB RenameFilePlease LIB "setuphlp.DLL" (szOrig$,szNew$)
  75.  
  76. DECLARE FUNCTION FIsVGA LIB "mscuistf.dll" AS INTEGER
  77. DECLARE FUNCTION FIs256Colour LIB "colors.dll" AS INTEGER
  78. DECLARE FUNCTION Welcome() AS INTEGER
  79. DECLARE FUNCTION TestSystem() AS INTEGER
  80. DECLARE FUNCTION GetDiskSpaceNeeded(drive%) AS LONG
  81. DECLARE SUB Initialise(prodName$, defInstallPath$, msgCaption$)
  82. DECLARE SUB DeInitialise()
  83. DECLARE SUB AskQuit()
  84. DECLARE SUB BadPath()
  85. DECLARE SUB NetworkDrive()
  86. DECLARE SUB UpdateIndeoAVIDrivers()
  87. DECLARE SUB UpdateWinGDrivers()
  88. 'DECLARE SUB UpdateProgramManager(prodName$, appExeFile$, appPengeFile$, readmeFile$, readmeStr$, onCDROM%)
  89. 'DECLARE SUB UpdateProgramManagerAlt(prodName$, readmeName$, appExeFile$, appPengeFile$, readmeFile$, readmeStr$, onCDROM%)
  90. DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
  91. DECLARE FUNCTION GetRealWindowsSysDir AS STRING
  92. DECLARE SUB UpdateWinG32 (szOrig$)
  93. DECLARE SUB InitCommonInstall()
  94. DECLARE FUNCTION LicenseAgreement() AS INTEGER
  95. DECLARE FUNCTION Win32sRequiredDLG() AS INTEGER
  96. DECLARE FUNCTION UpdateADPCMDrivers() AS INTEGER
  97. DECLARE FUNCTION EndCommonInstall( AppReadmeFile$, InRoot%, szEditorExe$ ) AS INTEGER
  98. DECLARE FUNCTION HandleRestart() AS INTEGER
  99. DECLARE FUNCTION InstallQTW() As Integer
  100. DECLARE FUNCTION OnWindowsNT LIB "INIUPD.DLL" AS INTEGER
  101.  
  102. '  SetWindowPos() flags
  103. const SWP_NOSIZE         = &H0001
  104. const SWP_NOMOVE         = &H0002
  105. const SWP_NOACTIVATE     = &H0010
  106. const SWP_SHOWWINDOW     = &H0040
  107. const SWP_HIDEWINDOW     = &H0080
  108. const HWND_TOP       = (0)
  109. const HWND_BOTTOM    = (1)
  110. const HWND_TOPMOST   = (-1)
  111. const HWND_NOTOPMOST = (-2)
  112.  
  113.  
  114. 'Dialog Box ID's
  115. CONST DLG_ABORT                       =100
  116. CONST DLG_ADDSYSTEMSOFT               =101
  117. CONST DLG_ADPCMHELP                   =102
  118. CONST DLG_AWFULMACHINE                =103
  119. CONST DLG_BADEXIT                     =110
  120. CONST DLG_BADVGA                      =111
  121. CONST DLG_BADPATH                     =112
  122. CONST DLG_BILLBOARD                   =113
  123. CONST DLG_CUSTOM                      =120
  124. CONST DLG_CUSTOMHELP                  =121
  125. CONST DLG_DESTPATH                    =130
  126. CONST DLG_DEVELOPER                     =133
  127. CONST DLG_DONEVIDEO                   =131
  128. CONST DLG_DONENOVIDEO                 =132
  129. CONST DLG_EXITFAILNOTENH              =140
  130. CONST DLG_EXITFAILNOTINTEL            =141
  131. CONST DLG_EXITFAILNOTWIN31            =142
  132. CONST DLG_EXITFAILRUNAPP              =143
  133. CONST DLG_FREECELLINST                =150
  134. CONST DLG_INSTALLQTW                  =180
  135. CONST DLG_LICENSE                     =210
  136. CONST DLG_MAILMAN                     =220
  137. CONST DLG_NOSPACE                     =230
  138. CONST DLG_NEEDS31                     =231
  139. CONST DLG_NOMOUSE                     =232
  140. CONST DLG_NOT256                      =233
  141. CONST DLG_NOSYSSOFT                   =234
  142. CONST DLG_NODISKSPACE                 =235
  143. CONST DLG_NEEDSWIN32S                 =236
  144. CONST DLG_NETWORKDRIVE                =237
  145. CONST DLG_PATHHELP                    =240
  146. CONST DLG_POORMACHINE                 =241
  147. CONST DLG_PROGMANGROUP                =242
  148. CONST DLG_PROGMANGRP                  =243
  149. CONST DLG_QUIT                        =250
  150. CONST DLG_SPEED                       =270
  151. CONST DLG_SUCCESS                     =271
  152. CONST DLG_URKADPCM                    =290
  153. CONST DLG_WELCOME                     =310
  154. CONST DLG_WELHELP                     =311
  155. CONST DLG_WRONGADPCM                  =312
  156. CONST DLG_WHIZZHELP                   =313
  157. 'Bitmap ID
  158. CONST IDB_BITMAP                      =1000
  159.  
  160. ' Error messages
  161. CONST ERR_OK = 100
  162. CONST ERR_EXITFAIL = 101
  163. CONST ERR_WINVERFAIL = 102
  164. CONST ERR_NODISKSPACE = 103
  165.  
  166. ' Navigation messages
  167. CONST NAV_FORWARD = 0
  168. CONST NAV_BACK = 1
  169. CONST NAV_EXIT = 2
  170. CONST NAV_RUN = 3
  171.  
  172.  
  173. GLOBAL szDirectCommand As String
  174. GLOBAL szWinPath As String
  175. GLOBAL szWinSysPath As String
  176. GLOBAL szWinDrive As String
  177. GLOBAL szSrcSetupPath As String
  178. GLOBAL szSrcBinPath As String
  179. GLOBAL szDestPath As String
  180. GLOBAL szOldDestPath As String
  181. GLOBAL szPengePath As String
  182. GLOBAL szINFPath As String
  183. GLOBAL szAppINIPath As String
  184. GLOBAL szMsgCaption As String
  185. GLOBAL szButton As String
  186. GLOBAL szMinimalInstall As String
  187. GLOBAL szAddPMItem As String
  188. GLOBAL szExpressCustomChoice As String
  189. GLOBAL szMMappPath As String
  190. GLOBAL szInstExePath As String
  191. GLOBAL szInstExeDate As String
  192. GLOBAL szCdExePath As String
  193. GLOBAL szCdExeDate As String
  194. GLOBAL szCopyright As String
  195. GLOBAL szFullSampPath As String
  196. GLOBAL szSampINIPath As String
  197. GLOBAL szSampData As String
  198. GLOBAL szSampVersion As String
  199. GLOBAL szMsacmPriority1 As String
  200. GLOBAL szMsacmPriority2 As String
  201. GLOBAL szMsacmPriority3 As String
  202. GLOBAL bInstalledWin32s As Integer
  203. GLOBAL APPLICATION_INI_FILE As String
  204. GLOBAL APPLICATION_EXE_FILE As String
  205. GLOBAL APPLICATION_PENGE_FILE As String
  206. GLOBAL szDKRegIni As String ' MMAPP.INI
  207.  
  208. GLOBAL fPreviousMode As Integer
  209. GLOBAL fWillNotFit As Integer
  210. GLOBAL fSystemUpdated As Integer
  211. GLOBAL hDlg As Integer
  212. GLOBAL dButton As Integer
  213. GLOBAL dWinDrive As Integer
  214. GLOBAL dDestDrive As Integer
  215. GLOBAL dCursor As Integer
  216. GLOBAL hwndSetup As Integer
  217. GLOBAL hwndApple As Integer
  218. GLOBAL OS_Windows95 As Integer
  219. GLOBAL bscrunged As Integer
  220. GLOBAL szErrorCode As String
  221. GLOBAL szReply As String
  222.  
  223. GLOBAL WinVer As Integer
  224. GLOBAL Ver As String
  225. GLOBAL szSystem32Path As String
  226.  
  227. GLOBAL  numcolours As Integer
  228. GLOBAL strnumcol As String
  229.  
  230. ' This file needs the above globals etc for it's functions
  231. '$INCLUDE 'product.inc' 'Defines which change for every product
  232.  
  233. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  234. Sub InitCommonInstall() STATIC
  235. '    AddToBillboardList CUIDLL_FILENAME, DLG_MAILMAN, "MailmanDlgProc", 2500
  236.     AddToBillboardList "colors.dll", DLG_MAILMAN, "MailmanDlgProc", 25
  237.     numcolours=FIs256Colour()
  238. strnumcol=STR$(numcolours)
  239. 'dButton = DoMsgBox( strnumcol, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  240.     if numcolours<16 then  ' The 16 referes to the Bits per pixel and not 16 colours. That would be 8
  241. '        AddToBillboardList "Colors.dll", DLG_MAILMAN, "ColoursDlgProc", 25
  242.         AddToBillboardList "colors.dll", DLG_MAILMAN, "ColorsDlgProc", 25
  243.    endif
  244.     SetCopyGaugePosition -1, 150
  245. End Sub
  246.  
  247.  
  248. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  249. Function EndCommonInstall( AppReadmeFile$, InRoot%, szEditorExe$ ) STATIC AS INTEGER
  250.  
  251.     if RestartListEmpty = 0 or fSystemUpdated = 1 or bInstalledWin32s = 1 then
  252.         hDlg = DLG_DONEVIDEO
  253.     else
  254.         hDlg = DLG_DONENOVIDEO
  255.     end if
  256.  
  257. QuitLoop:
  258.     szButton = UIStartDlg(CUIDLL_FILENAME, hDlg, "FInfoDlgProc", 0, "")
  259.     select case szButton
  260.     case "REACTIVATE"
  261.         goto QuitLoop
  262.     case "CONTINUE"     'Read me
  263.         if inRoot% = 1 then
  264.             szReadMe$ = MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), appReadmeFile$)
  265.         else
  266.             szReadMe$ = MakePath(szSrcBinPath, appReadmeFile$)
  267.         end if
  268.         if szEditorExe$ = "write.exe " then
  269.             run szEditorExe$ + szReadMe$, nowait
  270.         else
  271.             run szEditorExe$ + szReadMe$
  272.         end if
  273.         goto QuitLoop
  274.     case "BACK"     'Restart Windows
  275.         if HandleRestart = 0 then
  276.             dButton = DoMsgBox( STR_SYSMESSAGE, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  277.             EndCommonInstall = NAV_EXIT
  278.         else
  279.             EndCommonInstall = NAV_FORWARD
  280.         end if
  281.     case "EXIT" , "CANCEL"         'Return to Windows
  282.         if hDlg = DLG_DONEVIDEO then
  283.             dButton = DoMsgBox( STR_SYSMESSAGE, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  284.             EndCommonInstall = NAV_EXIT
  285.         else
  286.             EndCommonInstall = NAV_FORWARD
  287.         end if
  288.     end select
  289.  
  290.     UIPop 1
  291. End Function
  292.  
  293.  
  294. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  295. Sub Initialise(prodName$, defInstallPath$, msgCaption$) STATIC
  296.     ret% = Ctl3dRegister(HinstFrame())
  297.     ret% = Ctl3dAutoSubClass(HinstFrame())
  298.  
  299.     szMsgCaption$ = msgCaption$
  300.  
  301.     cursor% = ShowWaitCursor()
  302.  
  303.     ClearCopyList
  304.     szWinSysPath = ucase$(GetWindowsSysDir ())
  305.     szWinPath = ucase$(GetWindowsDir ())
  306.     dWinDrive = asc(mid$((szWinPath), 1,1)) - asc("A")+1
  307.     szWinDrive = mid$(szWinPath, 1,1)
  308.  
  309.     szSrcSetupPath = ucase$(GetSymbolValue ("STF_SRCDIR"))
  310.     szSrcBinPath = mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1) + SOURCE_BINARIES_SUBDIR
  311.     szDestPath = szWinDrive + ":" + defInstallPath$
  312.  
  313. '+++
  314. '$IFDEF WITH_FULL_SAMPLER
  315.     szFullSampPath = szWinDrive + ":" + "\DKMM\" + SAMPLER_PATH
  316. '$ENDIF
  317. '---
  318.  
  319.     SetTitle szMsgCaption$
  320.     SetBitmap CUIDLL_FILENAME, IDB_BITMAP
  321.     szCopyright = STR_COPYRIGHT + "     Setup " + STR_VERSION
  322.     SetAbout prodName$, szCopyright
  323.  
  324.     fPreviousMode = SetBeepingMode (1)
  325.     fPreviousMode = SetDecompMode (1)
  326.     fPreviousMode = SetSilentMode (0)
  327.  
  328.     szINFPath = ucase$(GetSymbolValue("STF_SRCINFPATH"))
  329.     if szINFPath = "" then
  330.         szINFPath = ucase$(GetSymbolValue("STF_CWDDIR")) + SETUP_INF_FILENAME
  331.     end if
  332.     ReadInfFile szINFPath
  333.  
  334.     szExpressCustomChoice = "EXPRESS"
  335.     szMinimalInstall = "OFF"
  336. '    szAddPMItem = "ON"
  337.  
  338.     fSystemUpdated = 0
  339.     bInstalledWin32s = 0
  340.  
  341.     ' Set up Application file names
  342.     APPLICATION_INI_FILE = APP_SHORTNAME + ".INI"
  343.     APPLICATION_EXE_FILE = APP_SHORTNAME + ".EXE"
  344.     APPLICATION_PENGE_FILE = APP_SHORTNAME + ".PNG"
  345.  
  346.     RestoreCursor(cursor%)
  347. End Sub
  348.  
  349.  
  350. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  351. Sub DeInitialise() STATIC
  352.     ret% = Ctl3dUnregister(HinstFrame())
  353. End Sub
  354.  
  355.  
  356. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  357. Sub AskQuit() STATIC
  358. begin:
  359.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_QUIT, "FQuitDlgProc", 0, "")
  360.     select case szButton
  361.     case "REACTIVATE"
  362.         goto begin
  363.     case "EXIT" , "CANCEL"
  364.         error STFQUIT
  365.     case "CONTINUE"
  366.         UIPop 1
  367.     end select
  368. End Sub
  369.  
  370.  
  371. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  372. Sub BadPath() STATIC
  373. begin:
  374.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_BADPATH, "FInfo0DlgProc", 0, "")
  375.     select case szButton
  376.     case "REACTIVATE"
  377.         goto begin
  378.     end select
  379.     UIPop 1
  380. End Sub
  381.  
  382.  
  383.  
  384. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  385. Sub NetworkDrive() STATIC
  386. begin:
  387.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_NETWORKDRIVE, "FInfo0DlgProc", 0, "")
  388.     select case szButton
  389.     case "REACTIVATE"
  390.         goto begin
  391.     end select
  392.     UIPop 1
  393. End Sub
  394.  
  395. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  396. Function LicenseAgreement() STATIC As Integer
  397. begin:
  398.     szButton = UIStartDlg( CUIDLL_FILENAME, DLG_LICENSE, "FInfoDlgProc", 0, "" )
  399.     select case szButton
  400.     case "CONTINUE"
  401.         UIPop 1
  402.         LicenseAgreement = NAV_FORWARD
  403.     case "EXIT" , "CANCEL"
  404.         LicenseAgreement = NAV_EXIT
  405.     end select
  406. End Function
  407.  
  408. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  409. Function Welcome() STATIC As Integer
  410. begin:
  411.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_WELCOME, "FInfoDlgProc", DLG_WELHELP, PROC_HELP)
  412.     select case szButton
  413.     case "REACTIVATE"
  414.         goto begin
  415.     case "CONTINUE"
  416.         UIPop 1
  417.         Welcome = NAV_FORWARD
  418.     case "EXIT" , "CANCEL"
  419.         AskQuit
  420.         goto begin
  421.     end select
  422. End Function
  423.  
  424. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  425. Function TestSystem() STATIC As Integer
  426.  
  427. TestNortonAntiVirus:
  428.     szWinString$ = GetIniKeyString( "win.ini", "windows", "load")
  429.     ret% = instr( szWinString,"NAV\navtsrw.exe" )
  430.     if ret% <> 0  then
  431.         dButton = DoMsgBox(STR_NAV, szMsgCaption$, MB_OK)
  432.     endif
  433.  
  434. TestWinVer:
  435.     if GetWindowsMajorVersion() < 3 or (GetWindowsMajorVersion() = 3 and GetWindowsMinorVersion() < 10) then
  436.         TestWinVerDlgLoop:
  437.             szButton = UIStartDlg (CUIDLL_FILENAME, DLG_NEED31, "FInfoDlgProc", DLG_AWFULMACHINE, PROC_HELP)
  438.             select case szButton
  439.             case "EXIT" , "CANCEL"
  440.                 goto TestWinVerDlgLoop
  441.             end select
  442.     end if
  443.  
  444.     ' Check for Win 95
  445.     OS_Windows95 = 0
  446.  
  447.     WinVer=GetWindowsMajorVersion * 100 + GetWindowsMinorVersion
  448.     Ver$=str$(WinVer)
  449. '        dButton = DoMsgBox(ver$, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  450.     if ((GetWindowsMajorVersion * 100 + GetWindowsMinorVersion) > 350) THEN
  451.         OS_Windows95 = 1
  452. '****************************************************************************************************************************************
  453. '****************************************************************************************************************************************
  454. 'For debugging...
  455. '        dButton = DoMsgBox("This is windows 95", szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  456. '****************************************************************************************************************************************
  457. '****************************************************************************************************************************************
  458.     endif
  459.  
  460.      IF OnWindowsNT () THEN
  461.         if ((GetWindowsMajorVersion * 100 + GetWindowsMinorVersion) > 309) THEN
  462.             OS_Windows95 = 1
  463. '****************************************************************************************************************************************
  464. '****************************************************************************************************************************************
  465. 'For debugging...
  466. '        dButton = DoMsgBox("This is windows 95", szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  467. '****************************************************************************************************************************************
  468. '****************************************************************************************************************************************
  469.         endif
  470.     endif
  471.  
  472. TestVGA:
  473.     if GetScreenWidth () < 640 or GetScreenHeight () < 480 then
  474.         TestVGADlgLoop:
  475.             szButton = UIStartDlg (CUIDLL_FILENAME, DLG_BADVGA, "FInfoDlgProc", DLG_AWFULMACHINE, PROC_HELP)
  476.             select case szButton
  477.             case "REACTIVATE"
  478.                 goto TestVGADlgLoop
  479.             case "BACK"
  480.                 UIPop 1
  481.                 TestSystem = NAV_BACK
  482.                 goto back
  483.             case "CONTINUE"
  484.                 TestSystem = NAV_FORWARD
  485.                 UIPop 1
  486.                 goto TestMouse
  487.             case "EXIT" , "CANCEL"
  488.                 AskQuit
  489.                 goto TestVGADlgLoop
  490.             end select
  491.         end if
  492.  
  493. TestMouse:
  494.     if HasMouseInstalled() = false then
  495.     TestMouseDlgLoop:
  496.         szButton = UIStartDlg (CUIDLL_FILENAME, DLG_NOMOUSE, "FInfoDlgProc", DLG_AWFULMACHINE, PROC_HELP)
  497.         select case szButton
  498.         case "REACTIVATE"
  499.             goto TestMouseDlgLoop
  500.         case "BACK"
  501.             UIPop 1
  502.             TestSystem = NAV_BACK
  503.         case "CONTINUE"
  504.             TestSystem = NAV_FORWARD
  505.             UIPop 1
  506.             goto TestColour
  507.         case "EXIT" , "CANCEL"
  508.             AskQuit
  509.             goto TestMouseDlgLoop
  510.         end select
  511.     end if
  512.  
  513. TestColour:
  514.     if FIs256Colour() < 8 then  ' The 8 refers to the number of Bits per pixel...
  515.     TestColourDlgLoop:
  516.         szButton = UIStartDlg (CUIDLL_FILENAME, DLG_NOT256, "FInfoDlgProc", DLG_POORMACHINE, PROC_HELP)
  517.         select case szButton
  518.         case "REACTIVATE"
  519.             goto TestColourDlgLoop
  520.         case "BACK"
  521.             UIPop 1
  522.             TestSystem = NAV_BACK
  523.             goto back
  524.         case "CONTINUE"
  525.             UIPop 1
  526.             TestSystem = NAV_FORWARD
  527.         case "EXIT" , "CANCEL"
  528.             AskQuit
  529.             goto TestColourDlgLoop
  530.         end select
  531.     end if
  532.  
  533. back:
  534. End Function
  535.  
  536.  
  537. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  538. '**
  539. '** Purpose:
  540. '**     Appends a file name to the end of a directory path,
  541. '**     inserting a backslash character as needed.
  542. '** Arguments:
  543. '**     szDir$  - full directory path (with optional ending "\")
  544. '**     szFile$ - filename to append to directory
  545. '** Returns:
  546. '**     Resulting fully qualified path name.
  547. '*************************************************************************
  548. FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
  549.     IF szDir$ = "" THEN
  550.         MakePath = szFile$
  551.     ELSEIF szFile$ = "" THEN
  552.         MakePath = szDir$
  553.     ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
  554.         MakePath = szDir$ + szFile$
  555.     ELSE
  556.         MakePath = szDir$ + "\" + szFile$
  557.     END IF
  558. END FUNCTION
  559.  
  560.  
  561.  
  562. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  563. Function HandleRestart() STATIC AS INTEGER
  564.     ' Check there are system files to install AND check if Windows v3.1 or greater
  565.     if RestartListEmpty = 0 and GetWindowsMajorVersion >= 3 and GetWindowsMajorVersion >= 1 then
  566.         dButton = DoMsgBox(STR_EXIT, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  567.         tryagain:
  568.         if ExitExecRestart = 1 then
  569.             ' Exit failed
  570.             dButton = DoMsgBox(STR_EXITFAIL, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONSTOP)
  571.             goto tryagain
  572.         end if
  573.     end if
  574.  
  575.     HandleRestart = 1
  576.  
  577.     if RestartListEmpty = 1 then ' Empty, but we have to reboot
  578.         dummy% = ExitWindowsExec(MakePath(szDestPath, "_msrstrt.exe"), "")
  579.         if dummy% = 0 then
  580.             HandleRestart = 0
  581.         end if
  582.     end if
  583.  
  584. End Function
  585.  
  586. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  587. 'Sub UpdateProgramManager(prodName$, appExeFile$, appPengeFile$, readmeFile$, readmeStr$, onCDROM%) STATIC
  588. 'Dim szReadmeTitle As String
  589. 'Dim szInf As String
  590. '
  591. '    if onCDROM% = 1 then    'sampler
  592. '        CreateProgmanGroup STR_COMPANYNAME, "", cmoNone
  593. '        ShowProgmanGroup   STR_COMPANYNAME, 1, cmoNone
  594. '        szReadmeTitle = prodName$ + " " + readmeStr$
  595. '
  596. '        szInf = MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), appExeFile$)
  597. '        CreateProgmanItem STR_COMPANYNAME, prodName$, szInf, MakePath(szDestPath, "sampler.ico"), cmoOverwrite
  598. ''        CreateProgmanItem STR_COMPANYNAME, szReadmeTitle, "notepad.exe " + MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), readmeFile$), "", cmoOverwrite
  599. '    else
  600. '        if szAddPMItem = "ON" then
  601. '            CreateProgmanGroup STR_COMPANYNAME, "", cmoNone
  602. '            ShowProgmanGroup   STR_COMPANYNAME, 1, cmoNone
  603. '            szReadmeTitle = prodName$ + " " + readmeStr$
  604. '            if szMinimalInstall = "ON" then
  605. '                szInf = MakePath(szSrcBinPath, appExeFile$) + " " + MakePath(szSrcBinPath, appPengeFile$)
  606. '                CreateProgmanItem STR_COMPANYNAME, prodName$, szInf, szInf, cmoOverwrite
  607. '                CreateProgmanItem STR_COMPANYNAME, szReadmeTitle, "notepad.exe " + MakePath(szSrcBinPath, readmeFile$), "", cmoOverwrite
  608. '            else
  609. '                szInf = MakePath(szDestPath, appExeFile$) + " " + MakePath(szDestPath, appPengeFile$)
  610. '                CreateProgmanItem STR_COMPANYNAME, prodName$, szInf, szInf, cmoOverwrite
  611. '                CreateProgmanItem STR_COMPANYNAME, szReadmeTitle, "notepad.exe " + MakePath(szDestPath, readmeFile$), "", cmoOverwrite
  612. '            end if
  613. '        end if
  614. '    end if
  615. '
  616. 'End Sub
  617.  
  618.  
  619. ''''''''''''''''''''''''''''''''''''''''''''
  620.  
  621. '' Alternative function for french stowaway
  622. '' Readme icon has shortened name
  623. 'Sub UpdateProgramManagerAlt(prodName$, readmeName$, appExeFile$, appPengeFile$, readmeFile$, readmeStr$, onCDROM%) STATIC
  624. 'Dim szReadmeTitle As String
  625. 'Dim szInf As String
  626. '
  627. '    if onCDROM% = 1 then    'sampler
  628. '        CreateProgmanGroup STR_COMPANYNAME, "", cmoNone
  629. '        ShowProgmanGroup   STR_COMPANYNAME, 1, cmoNone
  630. '        szReadmeTitle = readmeName$ + " " + readmeStr$
  631. '
  632. '        szInf = MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), appExeFile$)
  633. '        CreateProgmanItem STR_COMPANYNAME, prodName$, szInf, MakePath(szDestPath, "sampler.ico"), cmoOverwrite
  634. ''        CreateProgmanItem STR_COMPANYNAME, szReadmeTitle, "notepad.exe " + MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), readmeFile$), "", cmoOverwrite
  635. '   else
  636. '        if szAddPMItem = "ON" then
  637. '            CreateProgmanGroup STR_COMPANYNAME, "", cmoNone
  638. '            ShowProgmanGroup   STR_COMPANYNAME, 1, cmoNone
  639. '            szReadmeTitle = readmeName$ + " " + readmeStr$
  640. '            if szMinimalInstall = "ON" then
  641. '                szInf = MakePath(szSrcBinPath, appExeFile$) + " " + MakePath(szSrcBinPath, appPengeFile$)
  642. '                CreateProgmanItem STR_COMPANYNAME, prodName$, szInf, szInf, cmoOverwrite
  643. '                CreateProgmanItem STR_COMPANYNAME, szReadmeTitle, "notepad.exe " + MakePath(szSrcBinPath, readmeFile$), "", cmoOverwrite
  644. '            else
  645. '                szInf = MakePath(szDestPath, appExeFile$) + " " + MakePath(szDestPath, appPengeFile$)
  646. '                CreateProgmanItem STR_COMPANYNAME, prodName$, szInf, szInf, cmoOverwrite
  647. '                CreateProgmanItem STR_COMPANYNAME, szReadmeTitle, "notepad.exe " + MakePath(szDestPath, readmeFile$), "", cmoOverwrite
  648. '            end if
  649. '        end if
  650. '    end if
  651. '
  652. 'End Sub
  653.  
  654.  
  655.  
  656. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  657. Function GetDiskSpaceNeeded( drive% ) STATIC As Long
  658. Dim dDummy As Long
  659.  
  660.     cursor% = ShowWaitCursor()
  661.  
  662.     SetSymbolValue "ExtraSpace", ""
  663.     SetSymbolValue "Needed", ""
  664.     SetSymbolValue "Cost", ""
  665.  
  666.     'Drives A - Z
  667.     for i% = 1 to 26
  668.         AddListItem "ExtraSpace", ""
  669.     next i%
  670.  
  671.     ReplaceListItem "ExtraSpace", dWinDrive, str$(MINIMUM_DISK_SPACE)    '2K for the INI file
  672.  
  673.     dDummy = GetCopyListCost("ExtraSpace","Needed","Cost")
  674.  
  675.     GetDiskSpaceNeeded = val(GetListItem ("Needed", drive))
  676.  
  677.     RemoveSymbol "Needed"
  678.     RemoveSymbol "Cost"
  679.     RemoveSymbol "ExtraSpace"
  680.  
  681.     RestoreCursor(cursor%)
  682. End Function
  683.  
  684.  
  685.  
  686. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  687. Sub UpdateIndeoAVIDrivers() STATIC
  688. Dim szWMDriver As String
  689. Dim szACMDriver As String
  690.  
  691.  
  692.     ' Dont update VFW on Win 95. It is already there.
  693.     IF OS_Windows95 = 0 then
  694.  
  695.         szWMDriver = GetIniKeyString(MakePath(szWinPath,"system.ini"), "drivers", "WaveMapper")
  696.  
  697.         if not(szWMDriver = "msacm.drv") then
  698.             fSystemUpdated = 1
  699.         end if
  700.  
  701.  
  702.         if VflatdPresent() = 0 then
  703.             CreateSysIniKeyValue szWinPath + "system.ini", "386Enh", "device", "dva.386", cmoOverwrite
  704.             fSystemUpdated = 1
  705.         end if
  706.         CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.IV32", "ir32.dll", cmoOverwrite
  707.         CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.IV31", "ir32.dll", cmoOverwrite
  708.         CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.RT21", "ir21.dll", cmoOverwrite
  709.         CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.YVU9", "iyvu9.dll", cmoOverwrite
  710.         CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.CVID", "iccvid.drv", cmoOverwrite
  711.         CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.MSVC", "msvidc.drv", cmoOverwrite
  712.         CreateIniKeyValue szWinPath + "system.ini", "Drivers", "VIDC.MRLE", "MSRLE.drv", cmoOverwrite
  713.         CreateIniKeyValue szWinPath + "WIN.INI", "mci extensions", "avi", "AVIVideo", cmoOverwrite
  714.         CreateIniKeyValue szWinPath + "system.ini", "mci", "AVIVideo", "mciavi.drv", cmoOverwrite
  715.         CreateIniKeyValue szWinPath + "control.ini", "drivers.desc", "ir21.dll", "Intel Indeo(TM) Video R2.1", cmoOverwrite
  716.  
  717.     END IF
  718.  
  719. End Sub
  720.  
  721. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  722. Sub UpdateWinGDrivers() STATIC
  723. Dim szDest As String
  724. Dim szDest1 As String
  725. Dim szDest2 As String
  726.  
  727.     ' only use DVA on Windows 3.x
  728.     if OnWin3x() = 1 then
  729.         AddSectionFilesToCopyList "dva", szSrcBinPath, szWinSysPath
  730.         if VflatdPresent() = 0 then
  731.             ' Taken out the path in the following device=dva.386 system.ini entry
  732.             CreateSysIniKeyValue szWinPath + "system.ini", "386Enh", "device", "dva.386", cmoOverwrite
  733.             fSystemUpdated = 1
  734.         end if
  735.     end if
  736.  
  737.     szDest = GetRealWindowsSysDir
  738.     szDest1 = MakePath(szDest,"wing32.dll")
  739.     szDest2 = MakePath(szDest,"wing32.xxx")
  740.     RenameFilePlease szDest1, szDest2
  741.  
  742.     UpdateWinG32 GetRealWindowsSysDir()
  743. End Sub
  744.  
  745. '''''''''''''''''''''''''''''''''''''''''''''''''
  746.  
  747. FUNCTION GetRealWindowsSysDir STATIC AS STRING
  748.     szBuf$ = string$(260, 32)
  749.     cbBuf% = GetRealSystemDir(szBuf$, 260)
  750.     IF cbBuf% = 0 THEN
  751.         ERROR STFERR
  752.     ELSE
  753.         IF cbBuf% > 259 THEN
  754.             res% = DoMsgBox("Buffer Overflow", "MS-Setup Error", MB_ICONHAND+MB_OK)
  755.             ERROR STFERR
  756.         END IF
  757.         szBuf$ = RTRIM$(szBuf$)
  758.         IF MID$(szBuf$, 1, 1) = "\" THEN
  759.             szBuf$ = MID$(CURDIR$, 1, 2) + szBuf$
  760.         ELSEIF MID$(szBuf$, 2, 1) <> ":" THEN
  761.             szBuf$ = MID$(CURDIR$, 1, 3) + szBuf$
  762.         END IF
  763.         IF MID$(szBuf$, LEN(szBuf$), 1) <> "\" THEN
  764.             szBuf$ = szBuf$ + "\"
  765.         END IF
  766.         GetRealWindowsSysDir = szBuf$
  767.     END IF
  768.  
  769.     szBuf$ = ""
  770. END FUNCTION
  771.  
  772. '''''''''''''''''''''''''''''''''''''''''''''''''
  773.  
  774. SUB UpdateWinG32 (szOrig$) STATIC
  775.     '
  776.     ' Here we check the version ourselves of wing32.dll, since
  777.     ' we can't get version checking for Win32 apps from Win16
  778.     '
  779.     FileNew$ = MakePath(szOrig$, "wing32.dll")
  780.     FileOrig$ = MakePath(szOrig$, "wing32.xxx")
  781.     IF IsWin32FileNewer( FileOrig$, FileNew$ ) THEN
  782.     RemoveFile FileOrig$, cmoForce
  783.     ELSE
  784.         RemoveFile FileNew$, cmoForce       ' get rid of new file
  785.     RenameFilePlease FileOrig$,FileNew$ ' put back old file
  786.     END IF
  787. END SUB
  788.  
  789. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  790. Function UpdateADPCMDrivers() STATIC As Integer
  791. Dim szWMDriver As String
  792. Dim szACMDriver As String
  793. Dim fUpdate As Integer
  794.  
  795.     '   Dont update ADPCM on Win 95. It is already there.
  796.     If OS_Windows95 = 0 then
  797.  
  798.     ' Check WaveMapper driver
  799.     szWMDriver = GetIniKeyString(MakePath(szWinPath,"system.ini"), "drivers", "WaveMapper")
  800.     szACMDriver = GetIniKeyString (MakePath(szWinPath, "system.ini"), "MSACM", "Install")
  801.  
  802.     if not(szWMDriver = "msacm.drv") then
  803.     ' Isn't installed so...
  804.  
  805.         ' If NO ADPCM drivers are installed so...
  806.         if (szWMDriver = "") then
  807.             ' Display a dialog saying "there are no ADPCM drivers on your system..."
  808.             fUpdate = 1
  809.         else
  810.             ' There is a different adpcm driver in there so warn about compatibility
  811.         loop1:
  812.             szButton = UIStartDlg(CUIDLL_FILENAME, DLG_URKADPCM, "FInfoDlgProc", DLG_ADPCMHELP, PROC_HELP)
  813.             select case szButton
  814.             case "REACTIVATE"
  815.                 goto loop1
  816.             case "EXIT" , "CANCEL"
  817.                 AskQuit
  818.                 goto loop1
  819.             case "CONTINUE"     ' YES
  820.                 UpdateADPCMDrivers = NAV_FORWARD
  821.                 UIPop 1
  822.                 fUpdate = 1
  823. '            case "CANCEL"       ' NO
  824. '                UIPop 1
  825. '                fUpdate = 0
  826.             case "BACK"
  827.                 UIPop 1
  828.                 UpdateADPCMDrivers = NAV_BACK
  829.                 goto back
  830.             end select
  831.         end if
  832.  
  833.  
  834.         if fUpdate = 1 then
  835.             CreateIniKeyValue szWinPath + "system.ini", "Drivers", "WaveMapper", "msacm.drv", cmoOverwrite
  836.             CreateIniKeyValue szWinPath + "system.ini", "Drivers", "MSACM.msadpcm", "msadpcm.acm", cmoOverwrite
  837.             CreateIniKeyValue szWinPath + "system.ini", "Drivers", "MSACM.imaadpcm", "imaadpcm.acm", cmoOverwrite
  838.             CreateIniKeyValue szWinPath + "control.ini", "drivers.desc", "msacm.drv", "Microsoft Sound Mapper V2.00", cmoOverwrite
  839.             CreateIniKeyValue szWinPath + "control.ini", "drivers.desc", "msadpcm.acm", "Microsoft ADPCM Codec V2.00", cmoOverwrite
  840.             CreateIniKeyValue szWinPath + "control.ini", "drivers.desc", "imaadpcm.acm", "Microsoft IMA ADPCM Codec V2.00", cmoOverwrite
  841.  
  842.             szMsacmPriority1 = GetIniKeyString(szWinPath + "MSACM.INI","PRIORITY","PRIORITY1")
  843.             szMsacmPriority2 = GetIniKeyString(szWinPath + "MSACM.INI","PRIORITY","PRIORITY2")
  844.             szMsacmPriority3 = GetIniKeyString(szWinPath + "MSACM.INI","PRIORITY","PRIORITY3")
  845.  
  846.             if mid$( szMsacmPriority1, 1, 1 ) = "0" then
  847.                 szMsacmPriority1 = "1" + mid$( szMsacmPriority1, 2, len(szMsacmPriority1)-1 )
  848.                 CreateIniKeyValue szWinPath + "msacm.ini", "PRIORITY", "PRIORITY1", szMsacmPriority1, cmoOverwrite
  849.             endif
  850.  
  851.             if mid$( szMsacmPriority2, 1, 1 ) = "0" then
  852.                 szMsacmPriority2 = "1" + mid$( szMsacmPriority2, 2, len(szMsacmPriority2)-1 )
  853.                 CreateIniKeyValue szWinPath + "msacm.ini", "PRIORITY", "PRIORITY2", szMsacmPriority2, cmoOverwrite
  854.             endif
  855.  
  856.             if mid$( szMsacmPriority3, 1, 1 ) = "0" then
  857.                 szMsacmPriority3 = "1" + mid$( szMsacmPriority3, 2, len(szMsacmPriority3)-1 )
  858.                 CreateIniKeyValue szWinPath + "msacm.ini", "PRIORITY", "PRIORITY3", szMsacmPriority3, cmoOverwrite
  859.             endif
  860.  
  861.             fSystemUpdated = 1
  862.         else
  863.         noSysSoftware:
  864.             ' No install warning
  865.             szButton = UIStartDlg(CUIDLL_FILENAME, DLG_NOSYSSOFT, "FInfoDlgProc", 0, "")
  866.             select case szButton
  867.             case "REACTIVATE"
  868.                 goto noSysSoftware
  869.             case "EXIT" , "CANCEL"
  870.                 AskQuit
  871.                 goto noSysSoftware
  872.             case "CONTINUE"
  873.                 UIPop 1
  874.             case "BACK"
  875.                 UIPop 1
  876.                 goto loop1
  877.             end select
  878.         end if
  879.  
  880.     end if
  881. back:
  882.     END IF
  883. End Function
  884.  
  885. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  886. Function InstallQTW() STATIC As Integer
  887.  
  888. begin:
  889.     szButton = UIStartDlg( CUIDLL_FILENAME, DLG_INSTALLQTW, "FInfoDlgProc", 0, "" )
  890.     select case szButton
  891.     case "REACTIVATE"
  892.         goto begin
  893.     case "CONTINUE" ' Yes Install QTW
  894.         '
  895.         'Put in the New Dialogue here... (If you do not know what you are doing then can you please do as we say!!!)
  896.         dButton = DoMsgBox(STR_QTWMSG1+STR_QTWMSG2+STR_QTWMSG3, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  897.         '
  898.         IF OS_Windows95 = 1 then
  899.             ' Install the 32 bit version on Windows 95
  900. '***************************************************************************************************************************************
  901.             'Enter the code to disable the lip sync thing... 32 bit...
  902.             'CreateIniKeyValue szWinPath + "Qtw.ini", "Sound 32", "DisableAutoRateAdjust", "1", cmoOverwrite
  903. '***************************************************************************************************************************************
  904. '            Run ( MakePath( szSrcBinPath, "qt32inst.exe" ) )
  905. ' Allow the
  906. 'hwndSetup = GetActiveWindow
  907. 'strnumcol=STR$(hwndSetup)
  908. 'dButton = DoMsgBox(strnumcol, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  909. 'dButton = DoMsgBox("Starting", szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  910. '            CreateIniKeyValue szWinPath + "Qtw.ini", "Sound 32", "DisableAutoRateAdjust", "-1", cmoOverwrite
  911.             Run MakePath( szSrcBinPath, "qt32inst.exe" ),NOWAIT
  912.             hwndApple = GetActiveWindow
  913. strnumcol=STR$(hwndApple)
  914. dButton = DoMsgBox(strnumcol, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  915.             hwndApple = GetParent(hwndApple)
  916. strnumcol=STR$(hwndApple)
  917. dButton = DoMsgBox(strnumcol, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  918. 'dButton = DoMsgBox("Finishing", szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  919.             i% = SetWindowPos(hwndApple, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE+SWP_NOMOVE)
  920.             ' Wait for QTW Install to Finish.
  921. '            szErrorCode = "-1"
  922.             WHILE i = 1
  923.                 ' Look in QTW.INI for the Sound 32 group and check the ErrorCode
  924. '                szErrorCode = GetIniKeyString (szWinPath + "Qtw.ini", "Sound 32", "DisableAutoRateAdjust")
  925.  '               dButton = DoMsgBox( szErrorCode,"QTW Installing", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  926.                 i% = SetWindowPos(hwndApple, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE+SWP_NOMOVE)
  927. 'strnumcol=STR$(i)
  928. 'dButton = DoMsgBox("The return value from SetWindowPos = "+strnumcol, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  929.             WEND
  930. 'dButton = DoMsgBox( "Ended the loop","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  931. 'intReply = LEN(szErrorCode)
  932. 'szReply = MID$(szErrorCode,1,1)
  933. 'dButton = DoMsgBox( szReply,"DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  934.         Else
  935.             ' Else Install the 16 bit version
  936. '***************************************************************************************************************************************
  937.             'Enter the code to disable the lip sync thing... 16 bit...
  938.             CreateIniKeyValue szWinPath + "Qtw.ini", "Sound", "DisableAutoRateAdjust", "1", cmoOverwrite
  939. '***************************************************************************************************************************************
  940.             Run ( MakePath( szSrcBinPath, "qt16inst.exe" ) )
  941.         END IF
  942. '        if szReply = "-" then
  943. '            dButton = DoMsgBox( "An error occured while installing DirectX","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  944. '            ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  945. '            error ERR_EXITFAIL
  946. '        else
  947. 'dButton = DoMsgBox( "No errors","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  948.         'ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  949. '        if szReply = "1" then
  950. 'dButton = DoMsgBox( "Restart","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  951. '            bInstalledWin32s = 1
  952. '        endif
  953.  
  954.         UIPop 1
  955.         InstallQTW = NAV_FORWARD
  956.  
  957.     case "BACK"     ' No Don't Install QTW
  958.         UIPop 1
  959.         InstallQTW = NAV_BACK
  960.     case "EXIT" , "CANCEL"
  961.         AskQuit
  962.         goto begin
  963.     end select
  964.  
  965. End Function
  966.  
  967. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''